package com.example.onion.hxchat.room.dao;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import com.example.onion.hxchat.room.entity.Apply;

import java.util.List;

/**
 * 好友申请信息dao
 * @author:onion
 * @data: 2020/7/8
 */
@Dao
public interface ApplyDao {
    @Insert
    void insertApply(Apply... apply);

    @Delete
    void deleteApply(Apply apply);

    @Update
    void updateApply(Apply apply);

    @Query("SELECT * FROM APPLY WHERE ownerUseId = :id")
    LiveData<List<Apply>> getAllApplyCur(String id);


}
